package com.example.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.AsyncResult;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.concurrent.Future;

/**
 * Asynchronous Tasks
 * @author Xu
 *
 */
@Slf4j
@Component
public class ScheduledTask {

   // @Scheduled(cron = "0/5 * * * * ?")
    public void doTask1() {
        log.info("Task1 executed.");
    }
}